<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/',function () {
    return view('welcome');
});

//后台登陆
Route::group(['middleware'=>'login'],function(){
	Route::get('/admin/index',function(){
		return view('/admin/index/index');
	});
	//后台用户管理
	Route::Controller('/admin/user','UserController');
	//分类
	Route::Controller('/admin/cate','CateController');
	//订单管理
	Route::Controller('/admin/comment','CommentController');
});

//后台登陆
Route::Controller('/admin/login','LoginController');

//后台论坛分区管理
Route::Controller('/admin/part','PartController');
//后台论坛版块管理
Route::Controller('/admin/section','SectionController');

//后台轮播图片
Route::Controller('/admin/lunbo','LunboController');
//前台显示轮播(测试用)
// Route::Controller('/home/lunbo','LunboListController');

/*
	后台友情链接
*/
Route::Controller('/admin/fri','FriController');
//前台友情链接显示(做测试用)
// Route::Controller('/home/fri','FriListController');

/*
	后台管理路由
*/
Route::get('/admin',function(){
	return view('admin.index.index');
});	


/*
	商品管理 隐式路由
*/
Route::controller('/admin/goods','GoodsController');
/*
	订单列表
*/

Route::Controller('/admin/order','OrderController');
/*
	前台订台提交
*/
// Route::Controller('/home/address','AddressController');
Route::match(['post','get'],'/home/address/insert','AddressController@insert');
Route::match(['post','get'],'/home/address/update','AddressController@update');
Route::match(['post','get'],'/home/address/delete','AddressController@delete');
// Route::match(['post','get'],'/home/address/zhuangtai','AddressController@zhuangtai');
Route::controller('/admin/order','OrderController');
//后台公告
Route::Controller('/admin/notice','NoticeController');
//后台意见反馈
Route::Controller('/admin/ider','AdminIderController');


//前台
Route::Controller('/header','LayoutController');

//前台登陆
Route::Controller('/home/login','HomeLoginController');
//前台注册
Route::Controller('/zhuce','HomeZhuceController');

//前台用户资料
Route::Controller('/home/user','HomeUserController');

//前台列表 与详情
Route::Controller('/home/list','ListController');

//收藏商品
Route::Controller('/home/collect','CollectController');

//前台购物车
Route::get('/cart/insert','CartController@insert');

Route::Controller('/home/cart','CartController');
Route::get('/cart/delete','CartController@delete');

//前台订单
// Route::match(['post','get'],'/home/order/index','HomeOrderController@index');
Route::Controller('/home/order','HomeOrderController');
// Route::match(['post','get'],'/home/order','HomeOrderController');

// Route::Controller('/home/address','HomeAddressController');
// Route::match(['post','get'],'/home/order/xiangqing','HomeOrderController@xiangqing');
//ceshi 
// Route::Controller('/cart','CartController');

//前台找回密码
Route::Controller('/zhaohui','HomeZhaohuiController');

//前台搜索
Route::Controller('/foreach','ForeachController');

//前台公告
Route::Controller('/notice','LayoutNoticeController');

//前台财富账户充值
Route::post('/home/chongzhi/insert','ChongzhiController@insert');


//意见反馈
Route::Controller('/ider','IderController');

//前台咨询
Route::Controller('/home/zixun','HomeZixunController');

//后台热门管理
Route::Controller('/admin/remen','ReMenController');

//前台评论
Route::Controller('/home/comment','HomeCommentController');
//前台论坛页
Route::Controller('/home/luntan','HomeLuntanController');

//后台网站维护
Route::Controller('/admin/switch','SwitchController');
